package cn.edu.ren.controller;

import cn.edu.ren.pojo.Student;
import cn.edu.ren.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collection;

/**
 * @PackageName: cn.edu.ren.controller
 * @ClassName: StudentController
 * @Description:
 * @author: RZS
 * @date: 2021/5/19  9:54
 */
@RestController
@RequestMapping("/student")
public class StudentController {

    @Autowired
    private IStudentService studentService;

    @GetMapping("/select_all")
    public Collection<Student> selectStudentAll(){
        return studentService.findAll();
    }
}
